Optimal. Leaf size=73 \[ a^3 x-\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3782, 3770, 3767, 8} \[ -\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}+a^3 x-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 3782
Rubi steps
\begin {align*} \int (a+b \csc (c+d x))^3 \, dx &=-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac {1}{2} \int \left (2 a^3+b \left (6 a^2+b^2\right ) \csc (c+d x)+5 a b^2 \csc ^2(c+d x)\right ) \, dx\\ &=a^3 x-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac {1}{2} \left (5 a b^2\right ) \int \csc ^2(c+d x) \, dx+\frac {1}{2} \left (b \left (6 a^2+b^2\right )\right ) \int \csc (c+d x) \, dx\\ &=a^3 x-\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}-\frac {\left (5 a b^2\right ) \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{2 d}\\ &=a^3 x-\frac {b \left (6 a^2+b^2\right ) \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.63, size = 152, normalized size = 2.08 \[ \frac {8 a^3 c+8 a^3 d x+24 a^2 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-24 a^2 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+12 a b^2 \tan \left (\frac {1}{2} (c+d x)\right )-12 a b^2 \cot \left (\frac {1}{2} (c+d x)\right )-b^3 \csc ^2\left (\frac {1}{2} (c+d x)\right )+b^3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+4 b^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-4 b^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.55, size = 155, normalized size = 2.12 \[ \frac {4 \, a^{3} d x \cos \left (d x + c\right )^{2} - 4 \, a^{3} d x + 12 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, b^{3} \cos \left (d x + c\right ) + {\left (6 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (6 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 134, normalized size = 1.84 \[ \frac {b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, {\left (d x + c\right )} a^{3} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, {\left (6 \, a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 6 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.37, size = 99, normalized size = 1.36 \[ a^{3} x +\frac {a^{3} c}{d}+\frac {3 a^{2} b \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}-\frac {3 a \,b^{2} \cot \left (d x +c \right )}{d}-\frac {b^{3} \csc \left (d x +c \right ) \cot \left (d x +c \right )}{2 d}+\frac {b^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 95, normalized size = 1.30 \[ a^{3} x + \frac {b^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} - \frac {3 \, a^{2} b \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} - \frac {3 \, a b^{2}}{d \tan \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.42, size = 234, normalized size = 3.21 \[ \frac {b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {b^3\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {b^3\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,d}+\frac {2\,a^3\,\mathrm {atan}\left (\frac {2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}{-2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+6\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}\right )}{d}+\frac {3\,a^2\,b\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {3\,a\,b^2\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {3\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \csc {\left (c + d x \right )}\right )^{3}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________